<?xml version="1.0" encoding="UTF-8"?>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>virterror: error handling interfaces for the libvirt library</title>
    <meta name="generator" content="Libvirt devhelp stylesheet"/>
    <link rel="start" href="index.html" title="libvirt Reference Manual"/>
    <link rel="up" href="general.html" title="API"/>
    <link rel="stylesheet" href="style.css" type="text/css"/>
    <link rel="chapter" href="general.html" title="API"/>
  </head>
  <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
    <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
      <tr valign="middle">
        <td>
          <a accesskey="p" href="libvirt-libvirt-stream.html">
            <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
          </a>
        </td>
        <td>
          <a accesskey="u" href="general.html">
            <img src="up.png" width="24" height="24" border="0" alt="Up"/>
          </a>
        </td>
        <td>
          <a accesskey="h" href="index.html">
            <img src="home.png" width="24" height="24" border="0" alt="Home"/>
          </a>
        </td>
        <th width="100%" align="center">libvirt Reference Manual</th>
      </tr>
    </table>
    <h2>
      <span class="refentrytitle">virterror</span>
    </h2>
    <p>virterror - error handling interfaces for the libvirt library</p>
    <p>Provides the interfaces of the libvirt library to handle errors raised while using the library.  Copyright (C) 2006-2016 Red Hat, Inc.  This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.  This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.  You should have received a copy of the GNU Lesser General Public License along with this library.  If not, see &lt;http://www.gnu.org/licenses/&gt;. </p>
    <div class="refsynopsisdiv">
      <h2>Synopsis</h2>
      <pre class="synopsis">typedef struct _virError <a href="#virError">virError</a>;
typedef enum <a href="#virErrorDomain">virErrorDomain</a>;
typedef enum <a href="#virErrorLevel">virErrorLevel</a>;
typedef enum <a href="#virErrorNumber">virErrorNumber</a>;
typedef <a href="libvirt-virterror.html#virError">virError</a> * <a href="#virErrorPtr">virErrorPtr</a>;
int	<a href="#virConnCopyLastError">virConnCopyLastError</a>		(<a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a> conn, <br/>					 <a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> to);
<a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a>	<a href="#virConnGetLastError">virConnGetLastError</a>	(<a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a> conn);
void	<a href="#virConnResetLastError">virConnResetLastError</a>		(<a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a> conn);
void	<a href="#virConnSetErrorFunc">virConnSetErrorFunc</a>		(<a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a> conn, <br/>					 void * userData, <br/>					 <a href="libvirt-virterror.html#virErrorFunc">virErrorFunc</a> handler);
int	<a href="#virCopyLastError">virCopyLastError</a>		(<a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> to);
void	<a href="#virDefaultErrorFunc">virDefaultErrorFunc</a>		(<a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> err);
typedef void <a href="#virErrorFunc">virErrorFunc</a>			(void * userData, <br/>					 <a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> error);
void	<a href="#virFreeError">virFreeError</a>			(<a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> err);
<a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a>	<a href="#virGetLastError">virGetLastError</a>		(void);
int	<a href="#virGetLastErrorCode">virGetLastErrorCode</a>		(void);
int	<a href="#virGetLastErrorDomain">virGetLastErrorDomain</a>		(void);
const char *	<a href="#virGetLastErrorMessage">virGetLastErrorMessage</a>	(void);
void	<a href="#virResetError">virResetError</a>			(<a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> err);
void	<a href="#virResetLastError">virResetLastError</a>		(void);
<a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a>	<a href="#virSaveLastError">virSaveLastError</a>	(void);
void	<a href="#virSetErrorFunc">virSetErrorFunc</a>			(void * userData, <br/>					 <a href="libvirt-virterror.html#virErrorFunc">virErrorFunc</a> handler);
</pre>
    </div>
    <div class="refsect1" lang="en">
      <h2>Description</h2>
    </div>
    <div class="refsect1" lang="en">
      <h2>Details</h2>
      <div class="refsect2" lang="en">
        <div class="refsect2" lang="en"><h3><a name="virError">Structure </a>virError</h3><pre class="programlisting">struct _virError {
    int	code	: The error code, a <a href="libvirt-virterror.html#virErrorNumber">virErrorNumber</a>
    int	domain	: What part of the library raised this error
    char *	message	: human-readable informative error message
    <a href="libvirt-virterror.html#virErrorLevel">virErrorLevel</a>	level	: how consequent is the error
    <a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a>	conn	: connection if available, deprecated see note above
    <a href="libvirt-libvirt-domain.html#virDomainPtr">virDomainPtr</a>	dom	: domain if available, deprecated see note above
    char *	str1	: extra string information
    char *	str2	: extra string information
    char *	str3	: extra string information
    int	int1	: extra number information
    int	int2	: extra number information
    <a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a>	net	: network if available, deprecated see note above
} virError;
</pre><p/>
</div>
        <hr/>
        <div class="refsect2" lang="en"><h3><a name="virErrorDomain">Enum </a>virErrorDomain</h3><pre class="programlisting">enum <a href="#virErrorDomain">virErrorDomain</a> {
    <a name="VIR_FROM_NONE">VIR_FROM_NONE</a> = 0
    <a name="VIR_FROM_XEN">VIR_FROM_XEN</a> = 1 /* Error at Xen hypervisor layer */
    <a name="VIR_FROM_XEND">VIR_FROM_XEND</a> = 2 /* Error at connection with xend daemon */
    <a name="VIR_FROM_XENSTORE">VIR_FROM_XENSTORE</a> = 3 /* Error at connection with xen store */
    <a name="VIR_FROM_SEXPR">VIR_FROM_SEXPR</a> = 4 /* Error in the S-Expression code */
    <a name="VIR_FROM_XML">VIR_FROM_XML</a> = 5 /* Error in the XML code */
    <a name="VIR_FROM_DOM">VIR_FROM_DOM</a> = 6 /* Error when operating on a domain */
    <a name="VIR_FROM_RPC">VIR_FROM_RPC</a> = 7 /* Error in the XML-RPC code */
    <a name="VIR_FROM_PROXY">VIR_FROM_PROXY</a> = 8 /* Error in the proxy code; unused since 0.8.6 */
    <a name="VIR_FROM_CONF">VIR_FROM_CONF</a> = 9 /* Error in the configuration file handling */
    <a name="VIR_FROM_QEMU">VIR_FROM_QEMU</a> = 10 /* Error at the QEMU daemon */
    <a name="VIR_FROM_NET">VIR_FROM_NET</a> = 11 /* Error when operating on a network */
    <a name="VIR_FROM_TEST">VIR_FROM_TEST</a> = 12 /* Error from test driver */
    <a name="VIR_FROM_REMOTE">VIR_FROM_REMOTE</a> = 13 /* Error from remote driver */
    <a name="VIR_FROM_OPENVZ">VIR_FROM_OPENVZ</a> = 14 /* Error from OpenVZ driver */
    <a name="VIR_FROM_XENXM">VIR_FROM_XENXM</a> = 15 /* Error at Xen XM layer */
    <a name="VIR_FROM_STATS_LINUX">VIR_FROM_STATS_LINUX</a> = 16 /* Error in the Linux Stats code */
    <a name="VIR_FROM_LXC">VIR_FROM_LXC</a> = 17 /* Error from Linux Container driver */
    <a name="VIR_FROM_STORAGE">VIR_FROM_STORAGE</a> = 18 /* Error from storage driver */
    <a name="VIR_FROM_NETWORK">VIR_FROM_NETWORK</a> = 19 /* Error from network config */
    <a name="VIR_FROM_DOMAIN">VIR_FROM_DOMAIN</a> = 20 /* Error from domain config */
    <a name="VIR_FROM_UML">VIR_FROM_UML</a> = 21 /* Error at the UML driver; unused since 5.0.0 */
    <a name="VIR_FROM_NODEDEV">VIR_FROM_NODEDEV</a> = 22 /* Error from node device monitor */
    <a name="VIR_FROM_XEN_INOTIFY">VIR_FROM_XEN_INOTIFY</a> = 23 /* Error from xen inotify layer */
    <a name="VIR_FROM_SECURITY">VIR_FROM_SECURITY</a> = 24 /* Error from security framework */
    <a name="VIR_FROM_VBOX">VIR_FROM_VBOX</a> = 25 /* Error from VirtualBox driver */
    <a name="VIR_FROM_INTERFACE">VIR_FROM_INTERFACE</a> = 26 /* Error when operating on an interface */
    <a name="VIR_FROM_ONE">VIR_FROM_ONE</a> = 27 /* The OpenNebula driver no longer exists. Retained for ABI/API compat only */
    <a name="VIR_FROM_ESX">VIR_FROM_ESX</a> = 28 /* Error from ESX driver */
    <a name="VIR_FROM_PHYP">VIR_FROM_PHYP</a> = 29 /* Error from IBM power hypervisor */
    <a name="VIR_FROM_SECRET">VIR_FROM_SECRET</a> = 30 /* Error from secret storage */
    <a name="VIR_FROM_CPU">VIR_FROM_CPU</a> = 31 /* Error from CPU driver */
    <a name="VIR_FROM_XENAPI">VIR_FROM_XENAPI</a> = 32 /* Error from XenAPI */
    <a name="VIR_FROM_NWFILTER">VIR_FROM_NWFILTER</a> = 33 /* Error from network filter driver */
    <a name="VIR_FROM_HOOK">VIR_FROM_HOOK</a> = 34 /* Error from Synchronous hooks */
    <a name="VIR_FROM_DOMAIN_SNAPSHOT">VIR_FROM_DOMAIN_SNAPSHOT</a> = 35 /* Error from domain snapshot */
    <a name="VIR_FROM_AUDIT">VIR_FROM_AUDIT</a> = 36 /* Error from auditing subsystem */
    <a name="VIR_FROM_SYSINFO">VIR_FROM_SYSINFO</a> = 37 /* Error from sysinfo/SMBIOS */
    <a name="VIR_FROM_STREAMS">VIR_FROM_STREAMS</a> = 38 /* Error from I/O streams */
    <a name="VIR_FROM_VMWARE">VIR_FROM_VMWARE</a> = 39 /* Error from VMware driver */
    <a name="VIR_FROM_EVENT">VIR_FROM_EVENT</a> = 40 /* Error from event loop impl */
    <a name="VIR_FROM_LIBXL">VIR_FROM_LIBXL</a> = 41 /* Error from libxenlight driver */
    <a name="VIR_FROM_LOCKING">VIR_FROM_LOCKING</a> = 42 /* Error from lock manager */
    <a name="VIR_FROM_HYPERV">VIR_FROM_HYPERV</a> = 43 /* Error from Hyper-V driver */
    <a name="VIR_FROM_CAPABILITIES">VIR_FROM_CAPABILITIES</a> = 44 /* Error from capabilities */
    <a name="VIR_FROM_URI">VIR_FROM_URI</a> = 45 /* Error from URI handling */
    <a name="VIR_FROM_AUTH">VIR_FROM_AUTH</a> = 46 /* Error from auth handling */
    <a name="VIR_FROM_DBUS">VIR_FROM_DBUS</a> = 47 /* Error from DBus */
    <a name="VIR_FROM_PARALLELS">VIR_FROM_PARALLELS</a> = 48 /* Error from Parallels */
    <a name="VIR_FROM_DEVICE">VIR_FROM_DEVICE</a> = 49 /* Error from Device */
    <a name="VIR_FROM_SSH">VIR_FROM_SSH</a> = 50 /* Error from libssh2 connection transport */
    <a name="VIR_FROM_LOCKSPACE">VIR_FROM_LOCKSPACE</a> = 51 /* Error from lockspace */
    <a name="VIR_FROM_INITCTL">VIR_FROM_INITCTL</a> = 52 /* Error from initctl device communication */
    <a name="VIR_FROM_IDENTITY">VIR_FROM_IDENTITY</a> = 53 /* Error from identity code */
    <a name="VIR_FROM_CGROUP">VIR_FROM_CGROUP</a> = 54 /* Error from cgroups */
    <a name="VIR_FROM_ACCESS">VIR_FROM_ACCESS</a> = 55 /* Error from access control manager */
    <a name="VIR_FROM_SYSTEMD">VIR_FROM_SYSTEMD</a> = 56 /* Error from systemd code */
    <a name="VIR_FROM_BHYVE">VIR_FROM_BHYVE</a> = 57 /* Error from bhyve driver */
    <a name="VIR_FROM_CRYPTO">VIR_FROM_CRYPTO</a> = 58 /* Error from crypto code */
    <a name="VIR_FROM_FIREWALL">VIR_FROM_FIREWALL</a> = 59 /* Error from firewall */
    <a name="VIR_FROM_POLKIT">VIR_FROM_POLKIT</a> = 60 /* Error from polkit code */
    <a name="VIR_FROM_THREAD">VIR_FROM_THREAD</a> = 61 /* Error from thread utils */
    <a name="VIR_FROM_ADMIN">VIR_FROM_ADMIN</a> = 62 /* Error from admin backend */
    <a name="VIR_FROM_LOGGING">VIR_FROM_LOGGING</a> = 63 /* Error from log manager */
    <a name="VIR_FROM_XENXL">VIR_FROM_XENXL</a> = 64 /* Error from Xen xl config code */
    <a name="VIR_FROM_PERF">VIR_FROM_PERF</a> = 65 /* Error from perf */
    <a name="VIR_FROM_LIBSSH">VIR_FROM_LIBSSH</a> = 66 /* Error from libssh connection transport */
    <a name="VIR_FROM_RESCTRL">VIR_FROM_RESCTRL</a> = 67 /* Error from resource control */
    <a name="VIR_ERR_DOMAIN_LAST">VIR_ERR_DOMAIN_LAST</a> = 68
};
</pre><p/>
</div>
        <hr/>
        <div class="refsect2" lang="en"><h3><a name="virErrorLevel">Enum </a>virErrorLevel</h3><pre class="programlisting">enum <a href="#virErrorLevel">virErrorLevel</a> {
    <a name="VIR_ERR_NONE">VIR_ERR_NONE</a> = 0
    <a name="VIR_ERR_WARNING">VIR_ERR_WARNING</a> = 1 /* A simple warning */
    <a name="VIR_ERR_ERROR">VIR_ERR_ERROR</a> = 2 /* An error */
};
</pre><p/>
</div>
        <hr/>
        <div class="refsect2" lang="en"><h3><a name="virErrorNumber">Enum </a>virErrorNumber</h3><pre class="programlisting">enum <a href="#virErrorNumber">virErrorNumber</a> {
    <a name="VIR_ERR_OK">VIR_ERR_OK</a> = 0
    <a name="VIR_ERR_INTERNAL_ERROR">VIR_ERR_INTERNAL_ERROR</a> = 1 /* internal error */
    <a name="VIR_ERR_NO_MEMORY">VIR_ERR_NO_MEMORY</a> = 2 /* memory allocation failure */
    <a name="VIR_ERR_NO_SUPPORT">VIR_ERR_NO_SUPPORT</a> = 3 /* no support for this function */
    <a name="VIR_ERR_UNKNOWN_HOST">VIR_ERR_UNKNOWN_HOST</a> = 4 /* could not resolve hostname */
    <a name="VIR_ERR_NO_CONNECT">VIR_ERR_NO_CONNECT</a> = 5 /* can't connect to hypervisor */
    <a name="VIR_ERR_INVALID_CONN">VIR_ERR_INVALID_CONN</a> = 6 /* invalid connection object */
    <a name="VIR_ERR_INVALID_DOMAIN">VIR_ERR_INVALID_DOMAIN</a> = 7 /* invalid domain object */
    <a name="VIR_ERR_INVALID_ARG">VIR_ERR_INVALID_ARG</a> = 8 /* invalid function argument */
    <a name="VIR_ERR_OPERATION_FAILED">VIR_ERR_OPERATION_FAILED</a> = 9 /* a command to hypervisor failed */
    <a name="VIR_ERR_GET_FAILED">VIR_ERR_GET_FAILED</a> = 10 /* a HTTP GET command to failed */
    <a name="VIR_ERR_POST_FAILED">VIR_ERR_POST_FAILED</a> = 11 /* a HTTP POST command to failed */
    <a name="VIR_ERR_HTTP_ERROR">VIR_ERR_HTTP_ERROR</a> = 12 /* unexpected HTTP error code */
    <a name="VIR_ERR_SEXPR_SERIAL">VIR_ERR_SEXPR_SERIAL</a> = 13 /* failure to serialize an S-Expr */
    <a name="VIR_ERR_NO_XEN">VIR_ERR_NO_XEN</a> = 14 /* could not open Xen hypervisor control */
    <a name="VIR_ERR_XEN_CALL">VIR_ERR_XEN_CALL</a> = 15 /* failure doing an hypervisor call */
    <a name="VIR_ERR_OS_TYPE">VIR_ERR_OS_TYPE</a> = 16 /* unknown OS type */
    <a name="VIR_ERR_NO_KERNEL">VIR_ERR_NO_KERNEL</a> = 17 /* missing kernel information */
    <a name="VIR_ERR_NO_ROOT">VIR_ERR_NO_ROOT</a> = 18 /* missing root device information */
    <a name="VIR_ERR_NO_SOURCE">VIR_ERR_NO_SOURCE</a> = 19 /* missing source device information */
    <a name="VIR_ERR_NO_TARGET">VIR_ERR_NO_TARGET</a> = 20 /* missing target device information */
    <a name="VIR_ERR_NO_NAME">VIR_ERR_NO_NAME</a> = 21 /* missing domain name information */
    <a name="VIR_ERR_NO_OS">VIR_ERR_NO_OS</a> = 22 /* missing domain OS information */
    <a name="VIR_ERR_NO_DEVICE">VIR_ERR_NO_DEVICE</a> = 23 /* missing domain devices information */
    <a name="VIR_ERR_NO_XENSTORE">VIR_ERR_NO_XENSTORE</a> = 24 /* could not open Xen Store control */
    <a name="VIR_ERR_DRIVER_FULL">VIR_ERR_DRIVER_FULL</a> = 25 /* too many drivers registered */
    <a name="VIR_ERR_CALL_FAILED">VIR_ERR_CALL_FAILED</a> = 26 /* not supported by the drivers (DEPRECATED) */
    <a name="VIR_ERR_XML_ERROR">VIR_ERR_XML_ERROR</a> = 27 /* an XML description is not well formed or broken */
    <a name="VIR_ERR_DOM_EXIST">VIR_ERR_DOM_EXIST</a> = 28 /* the domain already exist */
    <a name="VIR_ERR_OPERATION_DENIED">VIR_ERR_OPERATION_DENIED</a> = 29 /* operation forbidden on read-only connections */
    <a name="VIR_ERR_OPEN_FAILED">VIR_ERR_OPEN_FAILED</a> = 30 /* failed to open a conf file */
    <a name="VIR_ERR_READ_FAILED">VIR_ERR_READ_FAILED</a> = 31 /* failed to read a conf file */
    <a name="VIR_ERR_PARSE_FAILED">VIR_ERR_PARSE_FAILED</a> = 32 /* failed to parse a conf file */
    <a name="VIR_ERR_CONF_SYNTAX">VIR_ERR_CONF_SYNTAX</a> = 33 /* failed to parse the syntax of a conf file */
    <a name="VIR_ERR_WRITE_FAILED">VIR_ERR_WRITE_FAILED</a> = 34 /* failed to write a conf file */
    <a name="VIR_ERR_XML_DETAIL">VIR_ERR_XML_DETAIL</a> = 35 /* detail of an XML error */
    <a name="VIR_ERR_INVALID_NETWORK">VIR_ERR_INVALID_NETWORK</a> = 36 /* invalid network object */
    <a name="VIR_ERR_NETWORK_EXIST">VIR_ERR_NETWORK_EXIST</a> = 37 /* the network already exist */
    <a name="VIR_ERR_SYSTEM_ERROR">VIR_ERR_SYSTEM_ERROR</a> = 38 /* general system call failure */
    <a name="VIR_ERR_RPC">VIR_ERR_RPC</a> = 39 /* some sort of RPC error */
    <a name="VIR_ERR_GNUTLS_ERROR">VIR_ERR_GNUTLS_ERROR</a> = 40 /* error from a GNUTLS call */
    <a name="VIR_WAR_NO_NETWORK">VIR_WAR_NO_NETWORK</a> = 41 /* failed to start network */
    <a name="VIR_ERR_NO_DOMAIN">VIR_ERR_NO_DOMAIN</a> = 42 /* domain not found or unexpectedly disappeared */
    <a name="VIR_ERR_NO_NETWORK">VIR_ERR_NO_NETWORK</a> = 43 /* network not found */
    <a name="VIR_ERR_INVALID_MAC">VIR_ERR_INVALID_MAC</a> = 44 /* invalid MAC address */
    <a name="VIR_ERR_AUTH_FAILED">VIR_ERR_AUTH_FAILED</a> = 45 /* authentication failed */
    <a name="VIR_ERR_INVALID_STORAGE_POOL">VIR_ERR_INVALID_STORAGE_POOL</a> = 46 /* invalid storage pool object */
    <a name="VIR_ERR_INVALID_STORAGE_VOL">VIR_ERR_INVALID_STORAGE_VOL</a> = 47 /* invalid storage vol object */
    <a name="VIR_WAR_NO_STORAGE">VIR_WAR_NO_STORAGE</a> = 48 /* failed to start storage */
    <a name="VIR_ERR_NO_STORAGE_POOL">VIR_ERR_NO_STORAGE_POOL</a> = 49 /* storage pool not found */
    <a name="VIR_ERR_NO_STORAGE_VOL">VIR_ERR_NO_STORAGE_VOL</a> = 50 /* storage volume not found */
    <a name="VIR_WAR_NO_NODE">VIR_WAR_NO_NODE</a> = 51 /* failed to start node driver */
    <a name="VIR_ERR_INVALID_NODE_DEVICE">VIR_ERR_INVALID_NODE_DEVICE</a> = 52 /* invalid node device object */
    <a name="VIR_ERR_NO_NODE_DEVICE">VIR_ERR_NO_NODE_DEVICE</a> = 53 /* node device not found */
    <a name="VIR_ERR_NO_SECURITY_MODEL">VIR_ERR_NO_SECURITY_MODEL</a> = 54 /* security model not found */
    <a name="VIR_ERR_OPERATION_INVALID">VIR_ERR_OPERATION_INVALID</a> = 55 /* operation is not applicable at this time */
    <a name="VIR_WAR_NO_INTERFACE">VIR_WAR_NO_INTERFACE</a> = 56 /* failed to start interface driver */
    <a name="VIR_ERR_NO_INTERFACE">VIR_ERR_NO_INTERFACE</a> = 57 /* interface driver not running */
    <a name="VIR_ERR_INVALID_INTERFACE">VIR_ERR_INVALID_INTERFACE</a> = 58 /* invalid interface object */
    <a name="VIR_ERR_MULTIPLE_INTERFACES">VIR_ERR_MULTIPLE_INTERFACES</a> = 59 /* more than one matching interface found */
    <a name="VIR_WAR_NO_NWFILTER">VIR_WAR_NO_NWFILTER</a> = 60 /* failed to start nwfilter driver */
    <a name="VIR_ERR_INVALID_NWFILTER">VIR_ERR_INVALID_NWFILTER</a> = 61 /* invalid nwfilter object */
    <a name="VIR_ERR_NO_NWFILTER">VIR_ERR_NO_NWFILTER</a> = 62 /* nw filter pool not found */
    <a name="VIR_ERR_BUILD_FIREWALL">VIR_ERR_BUILD_FIREWALL</a> = 63 /* nw filter pool not found */
    <a name="VIR_WAR_NO_SECRET">VIR_WAR_NO_SECRET</a> = 64 /* failed to start secret storage */
    <a name="VIR_ERR_INVALID_SECRET">VIR_ERR_INVALID_SECRET</a> = 65 /* invalid secret */
    <a name="VIR_ERR_NO_SECRET">VIR_ERR_NO_SECRET</a> = 66 /* secret not found */
    <a name="VIR_ERR_CONFIG_UNSUPPORTED">VIR_ERR_CONFIG_UNSUPPORTED</a> = 67 /* unsupported configuration construct */
    <a name="VIR_ERR_OPERATION_TIMEOUT">VIR_ERR_OPERATION_TIMEOUT</a> = 68 /* timeout occurred during operation */
    <a name="VIR_ERR_MIGRATE_PERSIST_FAILED">VIR_ERR_MIGRATE_PERSIST_FAILED</a> = 69 /* a migration worked, but making the VM persist on the dest host failed */
    <a name="VIR_ERR_HOOK_SCRIPT_FAILED">VIR_ERR_HOOK_SCRIPT_FAILED</a> = 70 /* a synchronous hook script failed */
    <a name="VIR_ERR_INVALID_DOMAIN_SNAPSHOT">VIR_ERR_INVALID_DOMAIN_SNAPSHOT</a> = 71 /* invalid domain snapshot */
    <a name="VIR_ERR_NO_DOMAIN_SNAPSHOT">VIR_ERR_NO_DOMAIN_SNAPSHOT</a> = 72 /* domain snapshot not found */
    <a name="VIR_ERR_INVALID_STREAM">VIR_ERR_INVALID_STREAM</a> = 73 /* stream pointer not valid */
    <a name="VIR_ERR_ARGUMENT_UNSUPPORTED">VIR_ERR_ARGUMENT_UNSUPPORTED</a> = 74 /* valid API use but unsupported by the given driver */
    <a name="VIR_ERR_STORAGE_PROBE_FAILED">VIR_ERR_STORAGE_PROBE_FAILED</a> = 75 /* storage pool probe failed */
    <a name="VIR_ERR_STORAGE_POOL_BUILT">VIR_ERR_STORAGE_POOL_BUILT</a> = 76 /* storage pool already built */
    <a name="VIR_ERR_SNAPSHOT_REVERT_RISKY">VIR_ERR_SNAPSHOT_REVERT_RISKY</a> = 77 /* force was not requested for a risky domain snapshot revert */
    <a name="VIR_ERR_OPERATION_ABORTED">VIR_ERR_OPERATION_ABORTED</a> = 78 /* operation on a domain was canceled/aborted by user */
    <a name="VIR_ERR_AUTH_CANCELLED">VIR_ERR_AUTH_CANCELLED</a> = 79 /* authentication cancelled */
    <a name="VIR_ERR_NO_DOMAIN_METADATA">VIR_ERR_NO_DOMAIN_METADATA</a> = 80 /* The metadata is not present */
    <a name="VIR_ERR_MIGRATE_UNSAFE">VIR_ERR_MIGRATE_UNSAFE</a> = 81 /* Migration is not safe */
    <a name="VIR_ERR_OVERFLOW">VIR_ERR_OVERFLOW</a> = 82 /* integer overflow */
    <a name="VIR_ERR_BLOCK_COPY_ACTIVE">VIR_ERR_BLOCK_COPY_ACTIVE</a> = 83 /* action prevented by block copy job */
    <a name="VIR_ERR_OPERATION_UNSUPPORTED">VIR_ERR_OPERATION_UNSUPPORTED</a> = 84 /* The requested operation is not supported */
    <a name="VIR_ERR_SSH">VIR_ERR_SSH</a> = 85 /* error in ssh transport driver */
    <a name="VIR_ERR_AGENT_UNRESPONSIVE">VIR_ERR_AGENT_UNRESPONSIVE</a> = 86 /* guest agent is unresponsive, not running or not usable */
    <a name="VIR_ERR_RESOURCE_BUSY">VIR_ERR_RESOURCE_BUSY</a> = 87 /* resource is already in use */
    <a name="VIR_ERR_ACCESS_DENIED">VIR_ERR_ACCESS_DENIED</a> = 88 /* operation on the object/resource was denied */
    <a name="VIR_ERR_DBUS_SERVICE">VIR_ERR_DBUS_SERVICE</a> = 89 /* error from a dbus service */
    <a name="VIR_ERR_STORAGE_VOL_EXIST">VIR_ERR_STORAGE_VOL_EXIST</a> = 90 /* the storage vol already exists */
    <a name="VIR_ERR_CPU_INCOMPATIBLE">VIR_ERR_CPU_INCOMPATIBLE</a> = 91 /* given CPU is incompatible with host CP */
    <a name="VIR_ERR_XML_INVALID_SCHEMA">VIR_ERR_XML_INVALID_SCHEMA</a> = 92 /* XML document doesn't validate against schema */
    <a name="VIR_ERR_MIGRATE_FINISH_OK">VIR_ERR_MIGRATE_FINISH_OK</a> = 93 /* Finish API succeeded but it is expected to return NULL */
    <a name="VIR_ERR_AUTH_UNAVAILABLE">VIR_ERR_AUTH_UNAVAILABLE</a> = 94 /* authentication unavailable */
    <a name="VIR_ERR_NO_SERVER">VIR_ERR_NO_SERVER</a> = 95 /* Server was not found */
    <a name="VIR_ERR_NO_CLIENT">VIR_ERR_NO_CLIENT</a> = 96 /* Client was not found */
    <a name="VIR_ERR_AGENT_UNSYNCED">VIR_ERR_AGENT_UNSYNCED</a> = 97 /* guest agent replies with wrong id to guest-sync command (DEPRECATED */
    <a name="VIR_ERR_LIBSSH">VIR_ERR_LIBSSH</a> = 98 /* error in libssh transport driver */
    <a name="VIR_ERR_DEVICE_MISSING">VIR_ERR_DEVICE_MISSING</a> = 99 /* fail to find the desired device */
    <a name="VIR_ERR_INVALID_NWFILTER_BINDING">VIR_ERR_INVALID_NWFILTER_BINDING</a> = 100 /* invalid nwfilter binding */
    <a name="VIR_ERR_NO_NWFILTER_BINDING">VIR_ERR_NO_NWFILTER_BINDING</a> = 101 /* no nwfilter binding */
    <a name="VIR_ERR_NUMBER_LAST">VIR_ERR_NUMBER_LAST</a> = 102
};
</pre><p/>
</div>
        <hr/>
        <div class="refsect2" lang="en"><h3><a name="virErrorPtr">Typedef </a>virErrorPtr</h3><pre class="programlisting"><a href="libvirt-virterror.html#virError">virError</a> * virErrorPtr;
</pre><p/>
</div>
        <hr/>
        <div class="refsect2" lang="en"><h3><a name="virErrorFunc"/>Function type virErrorFunc</h3><pre class="programlisting">void	virErrorFunc			(void * userData, <br/>					 <a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> error)<br/>
</pre><p>Signature of a function to use when there is an error raised by the library.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>user provided data for the error callback</td></tr><tr><td><span class="term"><i><tt>error</tt></i>:</span></td><td>the error being raised.</td></tr></tbody></table></div></div>
        <hr/>
        <div class="refsect2" lang="en"><h3><a name="virConnCopyLastError"/>virConnCopyLastError ()</h3><pre class="programlisting">int	virConnCopyLastError		(<a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a> conn, <br/>					 <a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> to)<br/>
</pre><p>Copy the content of the last error caught on that connection

This method is not protected against access from multiple
threads. In a multi-threaded application, always use the
global virGetLastError() API which is backed by thread
local storage.

If the connection object was discovered to be invalid by
an API call, then the error will be reported against the
global error object.

Since 0.6.0, all errors reported in the per-connection object
are also duplicated in the global error object. As such an
application can always use virGetLastError(). This method
remains for backwards compatibility.

One will need to free the result with virResetError()</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>target to receive the copy</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if no error was found and the error code otherwise and -1 in case of parameter error.</td></tr></tbody></table></div></div>
        <hr/>
        <div class="refsect2" lang="en"><h3><a name="virConnGetLastError"/>virConnGetLastError ()</h3><pre class="programlisting"><a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a>	virConnGetLastError	(<a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a> conn)<br/>
</pre><p>Provide a pointer to the last error caught on that connection

This method is not protected against access from multiple
threads. In a multi-threaded application, always use the
global virGetLastError() API which is backed by thread
local storage.

If the connection object was discovered to be invalid by
an API call, then the error will be reported against the
global error object.

Since 0.6.0, all errors reported in the per-connection object
are also duplicated in the global error object. As such an
application can always use virGetLastError(). This method
remains for backwards compatibility.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the last error or NULL if none occurred.</td></tr></tbody></table></div></div>
        <hr/>
        <div class="refsect2" lang="en"><h3><a name="virConnResetLastError"/>virConnResetLastError ()</h3><pre class="programlisting">void	virConnResetLastError		(<a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a> conn)<br/>
</pre><p>The error object is kept in thread local storage, so separate
threads can safely access this concurrently.

Reset the last error caught on that connection</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr></tbody></table></div></div>
        <hr/>
        <div class="refsect2" lang="en"><h3><a name="virConnSetErrorFunc"/>virConnSetErrorFunc ()</h3><pre class="programlisting">void	virConnSetErrorFunc		(<a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a> conn, <br/>					 void * userData, <br/>					 <a href="libvirt-virterror.html#virErrorFunc">virErrorFunc</a> handler)<br/>
</pre><p>Set a connection error handling function, if @handler is NULL
it will reset to default which is to pass error back to the global
library handler.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>pointer to the user data provided in the handler callback</td></tr><tr><td><span class="term"><i><tt>handler</tt></i>:</span></td><td>the function to get called in case of error or NULL</td></tr></tbody></table></div></div>
        <hr/>
        <div class="refsect2" lang="en"><h3><a name="virCopyLastError"/>virCopyLastError ()</h3><pre class="programlisting">int	virCopyLastError		(<a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> to)<br/>
</pre><p>Copy the content of the last error caught at the library level

The error object is kept in thread local storage, so separate
threads can safely access this concurrently.

One will need to free the result with virResetError()</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>target to receive the copy</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>error code or -1 in case of parameter error.</td></tr></tbody></table></div></div>
        <hr/>
        <div class="refsect2" lang="en"><h3><a name="virDefaultErrorFunc"/>virDefaultErrorFunc ()</h3><pre class="programlisting">void	virDefaultErrorFunc		(<a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> err)<br/>
</pre><p>Default routine reporting an error to stderr.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>pointer to the error.</td></tr></tbody></table></div></div>
        <hr/>
        <div class="refsect2" lang="en"><h3><a name="virFreeError"/>virFreeError ()</h3><pre class="programlisting">void	virFreeError			(<a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> err)<br/>
</pre><p>Resets and frees the given error.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>error to free</td></tr></tbody></table></div></div>
        <hr/>
        <div class="refsect2" lang="en"><h3><a name="virGetLastError"/>virGetLastError ()</h3><pre class="programlisting"><a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a>	virGetLastError		(void)<br/>
</pre><p>Provide a pointer to the last error caught at the library level

The error object is kept in thread local storage, so separate
threads can safely access this concurrently.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the last error or NULL if none occurred.</td></tr></tbody></table></div></div>
        <hr/>
        <div class="refsect2" lang="en"><h3><a name="virGetLastErrorCode"/>virGetLastErrorCode ()</h3><pre class="programlisting">int	virGetLastErrorCode		(void)<br/>
</pre><p>Get the most recent error code (enum virErrorNumber).</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the most recent error code, or <a href="libvirt-virterror.html#VIR_ERR_OK">VIR_ERR_OK</a> if none is set.</td></tr></tbody></table></div></div>
        <hr/>
        <div class="refsect2" lang="en"><h3><a name="virGetLastErrorDomain"/>virGetLastErrorDomain ()</h3><pre class="programlisting">int	virGetLastErrorDomain		(void)<br/>
</pre><p>Get the most recent error domain (enum virErrorDomain).</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a numerical value of the most recent error's origin, or <a href="libvirt-virterror.html#VIR_FROM_NONE">VIR_FROM_NONE</a> if none is set.</td></tr></tbody></table></div></div>
        <hr/>
        <div class="refsect2" lang="en"><h3><a name="virGetLastErrorMessage"/>virGetLastErrorMessage ()</h3><pre class="programlisting">const char *	virGetLastErrorMessage	(void)<br/>
</pre><p>Get the most recent error message</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the most recent error message string in this thread, or a generic message if none is set</td></tr></tbody></table></div></div>
        <hr/>
        <div class="refsect2" lang="en"><h3><a name="virResetError"/>virResetError ()</h3><pre class="programlisting">void	virResetError			(<a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> err)<br/>
</pre><p>Reset the error being pointed to</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>pointer to the <a href="libvirt-virterror.html#virError">virError</a> to clean up</td></tr></tbody></table></div></div>
        <hr/>
        <div class="refsect2" lang="en"><h3><a name="virResetLastError"/>virResetLastError ()</h3><pre class="programlisting">void	virResetLastError		(void)<br/>
</pre><p>Reset the last error caught at the library level.

The error object is kept in thread local storage, so separate
threads can safely access this concurrently, only resetting
their own error object.</p>
</div>
        <hr/>
        <div class="refsect2" lang="en"><h3><a name="virSaveLastError"/>virSaveLastError ()</h3><pre class="programlisting"><a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a>	virSaveLastError	(void)<br/>
</pre><p>Save the last error into a new error object. On success, errno is
unchanged; on failure, errno is ENOMEM.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the copied error or NULL if allocation failed. It is the caller's responsibility to free the error with virFreeError().</td></tr></tbody></table></div></div>
        <hr/>
        <div class="refsect2" lang="en"><h3><a name="virSetErrorFunc"/>virSetErrorFunc ()</h3><pre class="programlisting">void	virSetErrorFunc			(void * userData, <br/>					 <a href="libvirt-virterror.html#virErrorFunc">virErrorFunc</a> handler)<br/>
</pre><p>Set a library global error handling function, if @handler is NULL,
it will reset to default printing on stderr. The error raised there
are those for which no handler at the connection level could caught.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>pointer to the user data provided in the handler callback</td></tr><tr><td><span class="term"><i><tt>handler</tt></i>:</span></td><td>the function to get called in case of error or NULL</td></tr></tbody></table></div></div>
        <hr/>
      </div>
    </div>
  </body>
</html>
